package HOANGVIETANH_EX4;

public class Entity {
	private int Thang;
	private int Nam;
	private String bientamthoi1;
	private String bientamthoi2;

	public int getThang() {
		return Thang;
	}

	public void setThang(int thang) {
		Thang = thang;
	}

	public int getNam() {
		return Nam;
	}

	public void setNam(int nam) {
		Nam = nam;
	}

	public String getBientamthoi1() {
		return bientamthoi1;
	}

	public void setBientamthoi1(String bientamthoi1) {
		this.bientamthoi1 = bientamthoi1;
	}

	public String getBientamthoi2() {
		return bientamthoi2;
	}

	public void setBientamthoi2(String bientamthoi2) {
		this.bientamthoi2 = bientamthoi2;
	}

	public boolean CheckI() {
		if ((getBientamthoi1().isEmpty() && getBientamthoi2().isEmpty())
				|| getBientamthoi1().isEmpty() || getBientamthoi2().isEmpty()) {
			return false;
		} else {
			Nam = Integer.parseInt(getBientamthoi1());
			Thang = Integer.parseInt(getBientamthoi2());
			return true;
		}
	}

}


